package edu.spec.wyn.week08.class2;

public class ThrougthWinter {
    private String winterCome(IHibernate hibernate){//接口可以作为参数
        return hibernate.hibernate();//第一个hibernate对象的引用，第二个hibernate（）方法
    }

    public static void main(String[] args) {
        Bear bear=new Bear("北极熊","鱼","北极");
        bear.wholeLife();
        Frog frog=new Frog("青蛙","害虫","田里");
        frog.wholeLife();
        ThrougthWinter tw=new ThrougthWinter();
        tw.winterCome(bear);
        tw.winterCome(frog);
    }
}
